package org.awenlice.playerdailyshop.data;

import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.storage.DimensionDataStorage;

public class CustomServerDataManager {
    private static final String DATA_NAME = "playerDailyShopRe";

    public static CustomServerData get(ServerLevel level) {
        DimensionDataStorage storage = level.getDataStorage(); // 获取数据存储
        return storage.computeIfAbsent(CustomServerData::load, CustomServerData::new, DATA_NAME);
    }
}